clear            // clear all variables
xdel(winsid())   // close all the graphic windows

Fe = 240 //kHz
ordre = 3;
filtCut     = 'bp'
filtType    = 'ellip'
LF_cut      = 10    //kHz
HF_cut      = 20    //kHz
FreqBand    = [LF_cut/Fe HF_cut/Fe]

hz=iir(ordre,filtCut,filtType,FreqBand,[.1 .03]);

[hzm,fr]=frmag(hz,256);
plot2d(Fe*fr',20*log10(hzm'))
xtitle('Discrete IIR filter',' ',' ');
q=poly(0,'q');     //to express the result in terms of the delay operator q=z^-1
hzd=horner(hz,1/q) 

//Poles Zeros Gain filter representation
[p,z,g]=iir(ordre,filtCut,filtType,FreqBand,[.1 .03]);
g*poly(z,'z')/poly(p,'z')

disp(g*poly(z,'z')/(poly(p,'z')))
//disp((1/0.5914789)*g*poly(z,'z')/((1/0.5914789)*poly(p,'z')))
